/* -*- C++ -*- vim: set syntax=cpp:
 * (C) 2005-2010 Frank-Rene Schaefer
 * ABSOLUTELY NO WARRANTY              */
#ifndef __QUEX_INCLUDE_GUARD__ANALYZER__MEMBER__MISC
#define __QUEX_INCLUDE_GUARD__ANALYZER__MEMBER__MISC

#include <quex/code_base/definitions>

QUEX_NAMESPACE_MAIN_OPEN

/* Callback on buffer content change --> user may safe its lexeme's away. */
QUEX_INLINE void        
QUEX_NAME(set_callback_on_buffer_content_change)(QUEX_TYPE_ANALYZER*  me,
                                                 void               (*callback)(QUEX_TYPE_CHARACTER*, 
                                                                                QUEX_TYPE_CHARACTER*));

/* Activate/deactivate byte order reversion (big-/little-endian) */
QUEX_INLINE bool        QUEX_NAME(byte_order_reversion)(QUEX_TYPE_ANALYZER* me);
QUEX_INLINE void        QUEX_NAME(byte_order_reversion_set)(QUEX_TYPE_ANALYZER* me,
                                                          bool Value);
/* Version information */
QUEX_INLINE const char* QUEX_NAME(version)(QUEX_TYPE_ANALYZER* me); 

/* Token handling. */
QUEX_INLINE QUEX_TYPE_TOKEN*  QUEX_NAME(token_p)(QUEX_TYPE_ANALYZER* me);

#if defined(QUEX_OPTION_TOKEN_POLICY_SINGLE)

#   if defined(QUEX_OPTION_USER_MANAGED_TOKEN_MEMORY)
    QUEX_INLINE void                QUEX_NAME(token_p_set)(QUEX_TYPE_ANALYZER*  me, 
                                                           QUEX_TYPE_TOKEN*     TokenP);
    QUEX_INLINE QUEX_TYPE_TOKEN*    QUEX_NAME(token_p_switch)(QUEX_TYPE_ANALYZER*  me, 
                                                              QUEX_TYPE_TOKEN*     TokenP);
#   endif

#elif defined(QUEX_OPTION_TOKEN_POLICY_QUEUE)
    QUEX_INLINE bool    QUEX_NAME(token_queue_is_empty)(QUEX_TYPE_ANALYZER* me);
    QUEX_INLINE void    QUEX_NAME(token_queue_remainder_get)(QUEX_TYPE_ANALYZER*  me,
                                                             QUEX_TYPE_TOKEN**    begin, 
                                                             QUEX_TYPE_TOKEN**    end);

#   if defined(QUEX_OPTION_USER_MANAGED_TOKEN_MEMORY)
    QUEX_INLINE void    QUEX_NAME(token_queue_get)(QUEX_TYPE_ANALYZER*  me, 
                                                   QUEX_TYPE_TOKEN** begin, size_t* size);

    QUEX_INLINE void    QUEX_NAME(token_queue_set)(QUEX_TYPE_ANALYZER*  me, 
                                                   QUEX_TYPE_TOKEN*     Begin, 
                                                   size_t               Size);
    QUEX_INLINE void    QUEX_NAME(token_queue_switch)(QUEX_TYPE_ANALYZER*  me, 
                                                      QUEX_TYPE_TOKEN**    memory, 
                                                      size_t*              n);
#   endif

#else
#   error "This section should never be compiled."
#endif

/* Print */
QUEX_INLINE void        QUEX_NAME(print_this)(QUEX_TYPE_ANALYZER* me);

QUEX_NAMESPACE_MAIN_CLOSE

#endif /* __QUEX_INCLUDE_GUARD__ANALYZER__MEMBER__MISC */

